<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"
      xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>新增银行卡信息</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link href="/dist/plugins/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/dist/plugins/webuploader-0.1.5/webuploader.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=f5a12a1d">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style type="text/css">
        .user {
            height: 30px;
            line-height: 30px;
            max-height: 30px;
            float: left;
            text-align: left;
            min-width: 32px;
            padding-left: 1px;
            overflow: hidden;
            cursor: pointer;
        }

        .user:hover {
            background-color: #cfd4d1;
        }

        .userbox .select.user {
            color: #fff;
            background-color: #045B9E;
        }

        .span-btn {
            position: absolute;
            left: 10px;
            margin-top: 4px;
            cursor: pointer;
        }

        .auditorName {
            text-align: center;
        }

        .IcoNormal {
            float: left;
            border-bottom: 0px;
            border-left: 0px;
            background-color: transparent;
            width: 16px;
            height: 16px;
            vertical-align: middle;
            border-top: 0px;
            border-right: 0px;
            background-image: url(/dist/img/upload_normal.gif);
            background-repeat: no-repeat;
            float: left;
        }

        .progressobj {
            height: 20px;
        }

        .progressobj .delfile {
            float: left;
            margin-left: 10px;
        }

        .select {
            color: #fff;
            background-color: #045B9E;
        }

        td .sp-value {
            display: inline-block;
            padding-left: 6px;
            word-wrap: break-word;
        }

        td {
            color: #2a8cec;
        }

        td.td-title, td select, td .filename, td.td-module {
            color: black;
            font-weight: normal !important;
        }

        .table-detail-payee:nth-child(even) td.td-title {
            background-color: white;
        }

        .printDiv {
            display: none;
        }

        .webuploader-pick {
            background: url(/dist/img/fjT1.png) no-repeat 5px center;
            display: block;
            padding: 0 4px;
            height: 22px;
            line-height: 22px;
            padding-left: 15px;
            margin: 0 auto;
            width: 70px;
            margin-top: 6px;
            border-radius: 4px;
        }

        .webuploader-pick-hover {
            color: #fff !important;
            background: url(/dist/img/fjT2.png) no-repeat 5px center;
            background-color: #0F6099;

        }

        #divUploadedFiles {
            /*padding: 4px;*/
            padding-bottom: 0;
        }


    </style>
</head>
<body>
<iframe id="ifAttach" style="display:none"></iframe>
<div class="layout" style="left:0px;top:0px;right:0px;bottom:0px;" id="app">
    <div class="center" style="padding-left:8px;padding-right:8px;">
        <table class="table-detail" style="margin-top: 10px;width: 380px;">
            <tr class="no-print" style="height: 29px;width: 380px;">
                <td colspan="4" class=" no-print td-module" style="background: yellow;">基本信息</td>
            </tr>
            <tr style="height: 30px;width: 380px;">
                <td  class="td-title" style="width: 100px;">*开户人姓名</td>
                <td colspan="3">
                    <input  type="text" id="bName"
                            v-model="tmpEvent.name" />
                </td>
            </tr>
            <tr style="height: 30px;width: 380px;">
                <td style="width: 100px;" class="td-title">*开户行名称</td>
                <td colspan="3"><input  type="text" id="bankName"
                                       v-model="tmpEvent.bankName" />
                </td>
            </tr>
            <tr style="height: 30px;width: 380px;">
                <td style="width: 100px;" class="td-title">*银行卡号</td>
                <td colspan="3">
                    <input id="bCard" type="text"
                            v-model="tmpEvent.bankCard" pattern="/\d{15}|\d{19}/" />
                </td>
            </tr>
        </table>
    </div>
    <div class="south no-print" style="height:50px;margin-top: 10px;line-height:50px;text-align:center;">

        <input type="button" style="margin-left:20px;margin-top: 10px;"
               value="保存" class="btn oaBtn btn-sm" @click="save()">
    </div>
</div>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=7e54a132"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=63aed32f"></script>

<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<!--ztree组件所需js-->
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.exhide-3.5.js"></script>
<script src="/dist/plugins/webuploader-0.1.5/webuploader.min.js"></script>
<script type="text/javascript" src="/dist/js/pages/apply/tmpevent/class.js"></script>
<script type="text/javascript" src="/dist/js/pages/system/systemService.js"></script>
<script type="text/javascript" src="/dist/js/pages/common/commonService.js"></script>
<script type="text/javascript" src="/dist/plugins/print/print.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript">
    var api = frameElement.api, W = api.opener;
    var app = new Vue({
        el: "#app",
        data: {

            tmpEvent : {
                id:$.wyui.page.urlParams.id,
                name:'',
                bankName:'',
                bankCard:'',
                delFlag:0,
                createTime:'',
                createUserId:getCurrentUser().id,
                userId:''
            },
        },
        methods: {
            save: function(){
                var bCard = $("#bCard").val();
                var bName = $("#bName").val();
                var bankName = $("#bankName").val();
                if(bankName ==''){
                    alert("开户行不能为空，请重新输入！");
                    return;
                }
                if(bName ==''){
                    alert("开户人姓名不能为空，请重新输入！");
                    return;
                }
                if(bCard ==''){
                    alert("银行卡号不能为空，请重新输入！");
                    return;
                }
                var that = this;
                console.log(that.tmpEvent)
                $.wyui.postMethod(urlConfig.bank.save,that.tmpEvent, function (data) {
                    var $iframe = top.findIframeByName("银行卡管理");
                    $iframe[0].contentWindow.refresh();
                    api.close();
                });



            },

            goBack: function () {
                api.close();
            }
        },
        mounted: function () {
            var that = this;
            if ($.wyui.page.urlParams.id !='' && $.wyui.page.urlParams.id !=0) {
                $.wyui.postMethod(urlConfig.bank.getBankById, {id:$.wyui.page.urlParams.id}, function (data) {
                    that.tmpEvent = data;
                });

            }
        }


    });
</script>
</body>
</html>